<?php namespace Common\Api;

use Framework\Model\Db;

class Ask
{
	
	public function getClick($id)
	{
		$ask  =(new Db('ask'))->where("id=$id")->first();
		return $ask['click'];
	}

	//更新点击数
	public function updateClick($id)
	{
		$sql = "UPDATE ask set click=click+1 WHERE id=$id";
		return (new Db('ask'))->execute($sql);
	}
}










